package com.alibaba.controller;

import com.alibaba.bean.PostComment;
import com.alibaba.bean.PostCommentResult;
import com.alibaba.service.PostCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/post", method = RequestMethod.GET)
public class PostCommentController {

    @Autowired
    private PostCommentService postCommentService;

    @PostMapping("/comment")
    public PostCommentResult postReply(PostComment postComment) {
        return postCommentService.reply(postComment);
    }

}
